package com.byit.utils;

import org.apache.shiro.crypto.hash.Md5Hash;

public class PasswordUtil {

    public static String pwdEncryptTwo(String password) {
        String hex = new Md5Hash(password).toHex().toString();

        String pw = hex.substring(5, 20);

        return new Md5Hash(pw).toHex().toString();
    }

    public static String pwdEncryptOne(String password) {
        String hex = new Md5Hash(password).toHex().toString();

        String pw = hex.substring(5, 20);

        return pw;
    }

    public static String pwdEncrypt(String password) {

        String pw = password.substring(5, 20);

        return new Md5Hash(pw).toHex().toString();
    }

    public static void main(String[] args) {
        System.out.println(pwdEncryptTwo("q123456"));
    }

}